import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sainbainu/common/models/request/feedback_request.dart';
import 'package:sainbainu/common/models/request/pager_request.dart';
import 'package:sainbainu/common/models/response/feedback_response.dart';
import 'package:sainbainu/common/repositories/common_repository.dart';
import 'package:sainbainu/common/repositories/feedback_repository.dart';
import 'package:sainbainu/common/widgets/widget.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';

class FeedbackState {
  // title
  final _title = "".obs;
  set title(value) => _title.value = value;
  get title => _title.value;

  /// 刷新控制器
  late EasyRefreshController refreshController;

  /// 内容仓库
  late FeedbackRepository feedbackRepository;

  /// 分页请求
  late PagerRequest pagerRequest;

  /// 内容
  FeedbackResponse feedbackResponse = FeedbackResponse(
    total: 0,
    rows: [],
  );

  /// 是否有更多
  bool hasMore = false;

  /// 文本控制
  late TextEditingController contentController;

  /// 图片上传控制器
  late ImageUploaderController imageUploaderController;

  /// 图片
  List<AssetEntity> feedbackImages = [];

  /// 提交信息
  FeedbackRequest feedbackRequest = FeedbackRequest();

  double itemRatio = 1.0;

  /// 公共仓库
  late CommonRepository commonRepository;
}
